(ns zesql.support.selmer)


(declare render add-tag!)

(try
  (require 'selmer.parser)
  (let [srender (intern 'selmer.parser 'render)]
    (def render (var-get srender))
    (defmacro add-tag! [k handler & tags]
      (list* 'selmer.parser/add-tag! (concat [k handler] tags))))

  (catch Exception _
    (defn render [& _]
      (throw (RuntimeException. ":dependencies [[selmer \"x.y.z\"]] is required for `dynamic`!")))
    (defmacro add-tag! [k handler & tags])))

